.rotate{
    width: 100px;
    background-color: #6cf;
    animation: h1rotate 10s linear infinite;
    //设置左右上角旋转
    transform-origin: 100% 0;
    

    // fill-mode是动画的结束状态，可选值有：none,forwards,backwards,both
}

@keyframes h1rotate {
    // from和to是动画的开始和结束状态
    // from{
    //     transform: rotate(0);
    // }

    // to{
    //     transform: rotate(360deg);
    // }
    0% {
        transform: rotate(0);
        background-color: #f66;
    }
    50% {
        transform: rotate(180deg);
        background-color: green;
    }

    // 结束的状态
    100% {
        transform: rotate(360deg);
        background-color: blue;
    }
}


.portal {

    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);


    div {
        width: 50%;
        height: 180px;
        background-color: #fff;
        border: 1px solid red;
        border-radius: 10px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);

        h2,
        section {
            text-align: center;
        }

        h2>span {
            color: red;
            float: right;
            padding-right: 20px;
        }

    }
}